﻿using System;
using System.ServiceModel;
using System.Security.Permissions;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Service.ExceptionHandling;
using System.Collections.Generic;
using Sinacor.Service.Infra.AuthorizationService.Service.DataContract.Request;
using Sinacor.Service.Infra.AuthorizationService.Service.DataContract.Response;
using System.IO;

namespace Sinacor.Service.Infra.AuthorizationService.Service.ServiceContract
{
    /// <summary>
    /// Contrato de servico IUser
    /// </summary>
    [ExceptionShielding]
    [ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Service.Infra.AuthorizationService.Service.ServiceContract", Name = "IUser", SessionMode = SessionMode.Allowed)]
    public interface IUser
    {
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        /*[NOVOSATRIBUTOS]*/
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "VerifyUserLogin")]
        VerifyUserLoginResponse VerifyUserLogin(LoginRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        /*[NOVOSATRIBUTOS]*/
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ChangePassword")]
        ChangePasswordResponse ChangePassword(ChangePasswordRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        /*[NOVOSATRIBUTOS]*/
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "VerifyChangePassword")]
        VerifyChangePasswordResponse VerifyChangePassword(LoginRequest request);

        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        /*[NOVOSATRIBUTOS]*/
        [OperationLog]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ResetPassword")]
        ResetPasswordResponse ResetPassword(LoginRequest request);

		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[OperationLog]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ValidateUserLogin")]
		VerifyUserLoginResponse ValidateUserLogin(LoginRequest request);

		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.BusinessFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.ValidationFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[OperationLog]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "VerifyIsBlocked")]
		VerifyIsBlockedResponse VerifyIsBlocked(LoginRequest request);

        //[OperationContract]
        //Stream DownloadLogPackage(DateTime from, DateTime to);
    }
}
